package com.lm56.common;

/**
 * Created by kelvin on 16/11/24.
 */
public class MyRequestBody<T> {



    private int pageSize; //分页大小
    private int currentPage;//当前页码
//    private int startIndex = 0 ; //记录开始
//    private int endIndex = 10000;
    private String sortString;

    private String queryStr;
    private T params;

    public String getQueryStr() {
        return queryStr;
    }

    public void setQueryStr(String queryStr) {
        this.queryStr = queryStr;
    }

    public T getParams() {
        return params;
    }

    public void setParams(T params) {
        this.params = params;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getStartIndex() {
        return (this.currentPage-1)*this.pageSize;
    }

//    public void setStartIndex(int startIndex) {
//        this.startIndex = startIndex;
//    }

    public int getEndIndex() {
        return this.currentPage*this.pageSize;
    }

//    public void setEndIndex(int endIndex) {
//        this.endIndex = endIndex;
//    }

    public String getSortString() {
        return sortString;
    }

    public void setSortString(String sortString) {
        this.sortString = sortString;
    }
}
